package com.daotingli.backendprograms.Service.Admin.Adminherd;

import com.daotingli.backendprograms.Repository.Admin.Adminherd.AdminHerdRepository;
import com.daotingli.backendprograms.utils.Result;
import org.apache.tomcat.util.digester.RuleSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminHerdService {
    @Autowired
    private AdminHerdRepository adminHerdRepository;

    public Result getAllHerds() {
        return Result.success(adminHerdRepository.getAllHerds());
    }

    public Result getBookAuthorSum() {
        return Result.success(adminHerdRepository.getBookAuthorSum());
    }

    public Result getBookTypeSum() {
        return Result.success(adminHerdRepository.getBookTypeSum());
    }

    public Result getBookTagSum() {
        return Result.success(adminHerdRepository.getBookTagSum());
    }
}
